<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

    <style>
        body{
            margin-left: 10%;
            line-height: 60px
        }
        .addbutton{
            width: 200px;
            height: 35px;
            margin-bottom: 20px;
        }
        input{
            border: 1px solid #000000;
            width: 350px;
            height: 40px;
        }
		input.type{
            border: 1px solid #000000;
            width: 200px;
            height: 40px;
        }
        select{
            border: 1px solid #000000;
            width: 350px;
            height: 40px;
        }
        table{
            width: 900px;
        }
		table.td{
            width: 100px;
        }
    </style>
</head>
<body>
<section class="rt_wrap content mCustomScrollbar">
 <div class="rt_content">
<section>
<h2><strong style="color:grey;"></strong></h2>
<div class="page_title">
<h2 class="fl">广告位添加</h2>
</div>
<form action="{{ URL('admin/sliderAdd') }}" method="post" enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{csrf_token()}}">
<table>    
    <tr>
        <th><font color='red'>*</font> 广告组名称 :</th>
        <td><input type="text" name="slider_name" style="font-size:20px" placeholder="广告组名称"></td>
    </tr>
	<tr>
        <th><font color='red'>*</font> 广告数量 :</th>
        <td class="input"><input type="text" style="font-size:20px" placeholder="广告数量" name="slider_num"/></td>
    </tr>
	<tr>
        <th><font color='red'>*</font> 广告序号 :</th>
        <td class="input"><input type="text" style="font-size:20px" placeholder="广告序号" name="slider_stu"/></td>
    </tr>
	<tr>
        <th><font color='red'>*</font> 广告 :</th>
        <td class="input"><input type="file" style="width:150px;" name="slider_img_path[]">&nbsp;&nbsp; <input type="text" name="slider_img_url[]" style="padding-left:50px;font-size:20px" placeholder="url   例如：http://www.youku.com/">&nbsp;&nbsp;<input type="text" name="hot[]" size=4 style="width:55px;font-size:18px;padding-left:20px;" placeholder="热度数"></td>
    </tr>
	<tr><td></td><td colspan="2"><a href="javascript:;" id="addlink">＋添加友情链接</a></td></tr>
	<tr>
        <th><input type="reset" style="width:100px;color:#6633cc;" value="取消"></th>
        <td><input type="submit" style="width:100px;color:#6633cc;" value="发布"></td>
    </tr>
</table>
</form>
</section>
 </div>
</section>
</body>
</html>
<script src="js/jquery.js"></script>
<script type="text/javascript">
//添加新的行
$('#addlink').click(function(){
	var newtr=$('#addlink').parent().parent();
	    newtr.before('<tr><td></td><td class="input"><input type="file" style="width:150px;" name="slider_img_path[]">&nbsp;&nbsp; <input type="text" name="slider_img_url[]" style="padding-left:50px;font-size:20px" placeholder="url   例如：http://www.youku.com/">&nbsp;&nbsp;<input type="text" name="hot[]" size=4 style="width:55px;font-size:18px;padding-left:20px;" placeholder="热度数"></td></td><td><a href="" >[-]</a></td></tr>');
})
//删除行
$('.jian').click(function(){
	$(this).parent().parent().remove();
})
</script>
